export const to=(url,switchTab)=>{
	if(!url)return
	if(switchTab){
		uni.switchTab({
			url
		})
	}else{
		uni.navigateTo({
			url
		})
	}	
}

export const prePage=()=>{
	let pages = getCurrentPages();
	let prePage = pages[pages.length - 2];
	// #ifdef H5
	return prePage;
	// #endif
	return prePage.$vm;
}